/*****************************************************
** Author:
** Date: 2022-01-12
*
*****************************************************/

#ifndef PCF8575_H
#define PCF8575_H

#ifdef __cplusplus
extern "C"{
#endif

typedef struct {
    int (*read)(unsigned char *pbuf, int len);
    int (*write)(unsigned char *pbuf, int len);
    unsigned short gpio_in;
    unsigned short gpio_out;
    unsigned short gpio_level;
} pcf8575_obj_t;

int pcf8575_read_io(pcf8575_obj_t *obj, unsigned short *io);
int pcf8575_write_io(pcf8575_obj_t *obj, unsigned short io);

#ifdef __cplusplus
}
#endif

#endif /* PCF8575_H */
